Skip to content

Conversation

@artiepoole
Copy link
Contributor

@artiepoole artiepoole commented Jan 21, 2026

This PR primarily adds docstrings to all files in the CLI part of FPGAd.

In doing so, two other changes were made:

  • get_platform_name was removed from the status_proxy.rs file - it doesn't exist in FPGAd.
  • sanitize_path_str was fixed such that it will not panic if the path doesn't exist (absolute path was none).

edit: these were moved into #150

@artiepoole artiepoole changed the title Add documentation for CLI part of FPGAd docs: cli: Add documentation for CLI part of FPGAd Jan 22, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive Rust documentation (docstrings) to the CLI component of FPGAd, making the codebase more maintainable and accessible to developers.

Changes:

  • Added module-level and function-level documentation throughout the CLI codebase
  • Removed non-existent get_platform_name method from the status proxy interface
  • Fixed sanitize_path_str to return a Result instead of panicking on path resolution failures

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cli/src/status.rs Added comprehensive documentation for status query functions including device state, platform types, and overlay information
cli/src/set.rs Added documentation for FPGA attribute setting functionality and command handler
cli/src/remove.rs Added documentation for overlay and bitstream removal operations
cli/src/proxies/status_proxy.rs Added documentation for DBus status interface methods and removed non-existent get_platform_name method
cli/src/proxies/mod.rs Added module-level documentation explaining the DBus proxy architecture
cli/src/proxies/control_proxy.rs Added documentation for DBus control interface methods including bitstream loading and overlay management
cli/src/main.rs Added top-level documentation with common concepts section explaining device handles, overlay handles, and error handling patterns
cli/src/load.rs Added documentation for loading operations and fixed sanitize_path_str to properly handle path resolution errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@artiepoole artiepoole force-pushed the artie/document_interfaces branch from 001157a to a0c1a68 Compare January 22, 2026 13:58
- main
- load
- remove
- set
- status

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole artiepoole force-pushed the artie/document_interfaces branch from a0c1a68 to 0278039 Compare January 22, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants